package com.indusfo.spc.pojo;

import com.indusfo.spc.common.pojo.BasePojo;
import lombok.Getter;
import lombok.Setter;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;

/**
 * sop设备资料表
 *  
 * @author XIET
 * 
 * @Version 修改时间:2018年12月3日,上午10:24:34
 */
@Getter
@Setter
@Table(name="T_B21_EQUIPMENT")
public class Equipment extends BasePojo {
	/**
	 * 
	 */
	private static final long serialVersionUID = -1345878012007492177L;
	@Id
	@Column(name="L_EQUIPMENT_ID", insertable = false)
	//设备id
    private Integer lEquipmentId;


    //设备编号
    private String vcEquipmentCode;
    //设备名称
    private String vcEquipmentName;
    //mac地址
    private String vcMac;
    //类型
    private Integer type;
    private String typeName;

    //产线
    private Integer lProductionLineId;
    //产线名称
    private String vcProductionLineName;
    //产线编码
    private String vcProductionLineCode;

    private Integer workshopId;//车间ID

    private String workshopName;//车间名称
    //工位
    private Integer lStation;

    private String  lStaCode;//工位编码
    //工位名称
    private String lStationName;
    //说明
    private String vcRemark;
    //数据状态
    private int lDataState =1;

    private String dataStateName ;// 状态名称

    public String getDataStateName() {
        Integer dataState = getLDataState();
        String lDataStateName ="";
        switch (dataState){
            case 1:
                lDataStateName = "启用";
                break;
            case 2:
                lDataStateName = "删除";
                break;
            case 3:
                lDataStateName = "停用";
                break;
        }
        return lDataStateName;
    }


    public Equipment(String vcEquipmentCode, String vcEquipmentName, String vcMac, String typeName, String vcProductionLineName, String lStationName) {
        this.vcEquipmentCode = vcEquipmentCode;
        this.vcEquipmentName = vcEquipmentName;
        this.vcMac = vcMac;
        this.typeName = typeName;
        this.vcProductionLineName = vcProductionLineName;
        this.lStationName = lStationName;
    }

    public Equipment() {
    }
}